<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var arr=[1,0,15,56,0,12];
			var arr1=[];
			for(var i in arr){
				if(arr[i]!=0){
					arr1.push(arr[i]);
				}
			}
			console.log(arr1);
		</script>
	</body>
</html>
